<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:71:"G:\wwwroot\vidio.test\public/../application/index\view\index\index.html";i:1532006787;}*/ ?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>个人中心</title>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <script src="./assets/js/mlayer.js"></script>

    <link rel="stylesheet" href="./aui/css/aui.css">
    <style>
        .vid-wrap{
            width:100%;background: #000;
            position:relative;
            padding-bottom:56.25%;    /*需要用padding来维持16:9比例,也就是9除以16*/
            height: 0;
        }
        .vid-wrap video{
            position: absolute;
            top:0;
            left: 0;
            width: 100%;
            height: 100%
        }
        .aui-list-item{
            padding-left:0rem !important;
        }
        .aui-media-list-item-inner{
            margin-left: 1rem;
        }

    </style>
</head>
<body onload="login()">  

     

        <div id="con" class="aui-content aui-margin-b-15">
                <ul class="aui-list aui-media-list">
                    <?php foreach($video as $v): ?>
                    <li class="aui-list-item">
                        <div class="aui-media-list-item-inner">
                            <div  style="width:6.5rem;"  class="aui-list-item-media">
                                <img style="height:4rem;" src="http://cdn.xqmag.cn/<?php echo $v->v_img; ?>">
                            </div>
                            <div class="aui-list-item-inner">
                                <div style="font-size:0.6rem;font-weight:bold;margin-bottom: 0.5rem;" class="aui-content aui-list-item-text">
                                      <?php echo $v->v_title; ?>
                                </div>
                              
                             
                                  <a style="display: inline-block" href="/index/index/detail?id=<?php echo $v->video_id; ?>">
                                    <div style="border-radius: 0.2rem; width:2.5rem;height:1.1rem;font-size:0.5rem;line-height:1.1rem;text-align:center" class="aui-btn-danger ">点击播放</div>
                                    </a> 
                                  <div style="display: inline-block;height: 1.5rem;font-size: 0.6rem;" class="">
                                    <span style="margin-left: 0.2rem;"> <i  style="" class="aui-iconfont aui-icon-display"></i> &nbsp; <?php echo $v->v_view_num; ?><i style="margin-left: 0.5rem" class="aui-iconfont aui-icon-laud"></i> &nbsp; <?php echo mt_rand(70,100); ?>%</span> 
                                   
                                  </div>
                            
                            </div>

                        </div>
                      
  
                    </li>
                    <?php endforeach; ?>
                   
                    <li  style="text-align:center;position: fixed;bottom:0px;width:100%;z-index:9999" class="aui-list-header">
                       <span onclick="huan()" style="margin: 0px auto;">换一批</span> 
                     
                    </li>
                </ul>
            </div>
</body>
</html>
<script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<script>
        $("#con").hide();
        layer.open({
            type: 2,
            shadeClose: false
            ,content: '获取片子中'
        });
  </script>

<script>
    var login = ()=>{

        
    

        <?php if(!session('uid')): ?>
   
        $.ajax('/index/index/login.html',{
            data:{'code':'<?php echo $_GET["code"]; ?>','daili':'<?php echo $_GET["daili"]; ?>'},
            success:(data)=>{
               if(data.code == 1){
             
                layer.closeAll();
                $("#con").show();
                
                 layer.open({
                        content: '登录成功!'
                        ,skin: 'msg'
                        ,time: 2 //2秒后自动关闭
                    });
               }else{
                //    window.location.href="/index.html";
               }
            }
        })
        <?php else: ?>

        layer.closeAll();
        $("#con").show();
                
        <?php endif; ?>
    }


    var huan = ()=>{
        var page = <?php $page =  isset($_GET['page']) ? $_GET['page'] : 1 ; ++$page;echo $page; ?>;
        if('<?php echo $pages; ?>' == page-1){
            window.location.href='./?page=1';
            return false;
        }

        window.location.href='./?page='+page;
    }


</script>